<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Text to Speech</title>
</head>
<body>
  <div>
    <textarea id="text-to-read" rows="4" cols="50">在这里输入想要朗读的文本</textarea>
    <button onclick="speakText()">播放语音</button>
  </div>

  <script>
    function speakText() {
      const text = document.getElementById('text-to-read').value;
      
      const speech = new SpeechSynthesisUtterance();
      speech.text = text;
      
      window.speechSynthesis.speak(speech);
    }
  </script>
</body>
</html>